﻿@using MvcTemplates

@Html.TextBox( "", ViewData.TemplateInfo.FormattedModelValue, ViewData.ModelMetadata.MergeAttributes<HtmlAttributesAttribute>( new { @class = Html.GetProfile().AutoCompleteClasses } ) )

@{
    var js = ViewData.ModelMetadata.GetTemplateData<AutoCompleteAttribute>().RenderJavascript( Url, Html );
}

<script type="text/javascript">
    @js
</script>